package cn.edu.bupt.scidata.config;

public enum ResultEnum {
    QiKan(2, "期刊论文"),
    HuiYi(3, "会议论文"),
    KeYan(4, "科研奖励"),
    ZhuanLi(5, "专利"),
    ZhuanZhu(6, "学术专著");

    private final int category;
    private final String value;

    ResultEnum(int category, String value) {
        this.category = category;
        this.value = value;
    }

    public static int getCategory(String type) {
        ResultEnum[] values = values();
        for (ResultEnum value : values) {
            if (value.value().equals(type)) {
                return value.category();
            }
        }
        return -1;
    }

    public int category() {
        return category;
    }

    public String value() {
        return value;
    }
}
